<?php $this->load->view("header"); ?>
<div id="frame">
	<h1>Ensemble des frames de la pr&eacute;sentation : <strong><?=$titleCol;?></strong></h1><br/><br/>

		<div id="boite_outils">
			<p id="boite">
				<span>
					<p> Boite à outils </p>
				</span>
				<span class="separation"></span>
				<span>
					<a href="#nogo" onclick="selectAll()">Tout s&eacute;lectionner</a> <br/>
					<a href="#nogo" onclick="deselectAll()">Tout dess&eacute;lectionner</a>
				</span>
				<span class="separation"></span>
				<span>
					<a href="<?=site_url();?>/manager/showCreate/<?=$idCol;?>">Cr&eacute;er une frame</a>
				</span>
				<span>
					<a href="#nogo" onclick="suprFrame()">Supprimer frame(s) s&eacute;lectionn&eacute;e(s)</a>
				</span>
				<span>
					<a href="#nogo"><del>Importer des frames d'autres pr&eacute;sentation</del></a>
				</span>
				<span class="separation"></span>
				<span>
					<a href="#nogo" onclick="showSection()">Ajouter une section</a>
				</span>
				<span>
					<a href="#nogo" onclick="showSubSection()">Ajouter une sous-section</a>
				</span>
				<span class="separation"></span>
				<span>
					<a href="#nogo" onclick="showAddStyle()">Ajouter un th&egrave;me</a>
				</span>
				<span>
					<a href="#nogo" onclick="showChooseStyle()">Choisir un th&egrave;me</a>
				</span>
				<span class="separation"></span>
				<span>
					<a href="#nogo" onclick="showGeneration()">G&eacute;n&eacute;rer un PDF</a>
				</span>
		</p> 

		</div>
		<div id="frames">
			<form action="<?=site_url();?>/rendering/generate" method="post" id="form">
				<ul id="list">
		
					<?php foreach($frames as $item): ?>
						<li id="frame_<?=$item['ID'];?>">
							<img src="<?=$item['IMG'];?>" alt=""/><br/>
							<input type="checkbox" name="<?=$item['ID'];?>" class="check"/> <?=$item['TITRE'];?> - 
							<a href="<?=site_url();?>/manager/showModification/<?=$item['ID'];?>/<?=$idCol;?>">Modifier</a>
						</li>
					<?php endforeach; ?>
				</ul>
		</div>

</div>
<div id="generatePdf">
	<h2>Générer un PDF : </h2>
	

		<label class="label_marge">Nom </label><input type="text" name="title" value="<?=$name;?>" /><br/>
		<label class="label_marge">Sauvegarder </label><input type="checkbox" name="save" /> 
		<p class="centrer">
			<input type="submit" value="G&eacute;n&eacute;rer" onclick="addSerialize()" id="btn" />
			<input type="hidden" name="idCol" value="<?=$idCol;?>" id="idCol"/>
			<input type="reset" value="Annuler" onclick="hideGeneration()"/>
		</p>
	</form>
</div>
<div id="addSection">
	<h2>Section : </h2>
	<span>
		<input type="text" id="newSection" />
		<a href="#nogo" onclick="insertSection()">OK</a> - 
		<a href="#nogo" onclick="hideSection()">Annuler</a>
	</span>
</div>
<div id="addSubSection">
	<h2>Sous section : </h2>
	<span>
		<input type="text" id="newSubSection" />
		<a href="#nogo" onclick="insertSubSection()">OK</a> - 
		<a href="#nogo" onclick="hideSubSection()">Annuler</a>
	</span>
</div>
<div id="addStyle">
	<h2>Importer un thème : </h2>
	
		<form action="<?=site_url();?>/style/style_upload" method="post" enctype="multipart/form-data">
			
			<input type="file" name="userfile" size="25" /> <br/>
			<p class="centrer">
				<input type="submit" value="Importer" />
				<input type="reset" value="Annuler" onclick="hideAddStyle()"/>
			</p>
			
		</form> 		
</div>
<div id="chooseStyle">
	<h2>Choisir un thème : </h2>
		<form action="<?=site_url();?>/style/change_style" method='post'> 
			<p>
				<label class="label_marge">Nom du thème </label>				
				<select id='choixStyle' name='liste_themes'>
					<?php include(dirname(__FILE__) . "/../liste_themes.html"); ?>
				</select>
			</p>
			<p class="centrer">
				<input type='submit' value='Changer de th&egrave;me' onclick='hideChooseStyle()'/>
				<input type="reset" value="Annuler" onclick="hideChooseStyle()"/>
			</p>
	</form>
</div>


<?php $this->load->view("footer"); ?>
